package com.usian.utils.threadlocal;


import com.usian.model.media.pojos.WmUser;

public class WmThreadLocalUtils {

    private final  static ThreadLocal<Integer> userThreadLocal = new ThreadLocal<>();

    /**
     * 设置当前线程中的用户
     * @param
     */
    public static void setUserId(Integer userId){
        userThreadLocal.set(userId);
    }

    /**
     * 获取线程中的用户
     * @return
     */
    public static Integer getUserId( ){
        return userThreadLocal.get();
    }

}
